package com.manthano.applogin.management.dao;

import java.util.List;

import com.manthano.applogin.authorization.bo.UserRole;
import com.manthano.applogin.management.bo.AppUser;

/**
 * @author Dell
 */
public interface AppUserDao
{
	/**
	 * @param appUser
	 * @return AppUser
	 */
	public AppUser addUser(AppUser appUser);

	/**
	 * @param userId
	 * @param userRole
	 */
	public void addUserRole(String userId, UserRole userRole);

	/**
	 * @param appUser
	 * @return boolean
	 */
	public boolean updateUser(AppUser appUser);

	/**
	 * @param userId
	 * @return boolean
	 */
	public boolean activateUser(String userId);

	/**
	 * @param userId
	 * @return boolean
	 */
	public boolean deactivateUser(String userId);

	/**
	 * @param userId
	 * @return boolean
	 */
	public boolean removeUser(String userId);

	/**
	 * @param userId
	 * @return LoginUser
	 */
	public AppUser getUser(String userId);

	/**
	 * @param userName
	 * @return LoginUser
	 */
	public AppUser getUserByUserName(String userName);

	/**
	 * @param userId
	 * @return LoginUser
	 */
	public List<UserRole> getUserRoles(String userId);
}
